#ifndef UC_BRLETRAV_H
#define UC_BRLETRAV_H 1

#include "zadesk.h"
#include "zrxobject.h"
#include "zrxboiler.h"
#include "ucbrgbl.h"
#include "ucbrtrav.h"


// forward class declarations
class UcGeCurve2d;
class UcGeCurve3d;
class UcGeNurbCurve2d;
class UcGeNurbCurve3d;
class UcBrLoop;
class UcBrEdge;
class UcBrFaceLoopTraverser;
class UcBrEdgeLoopTraverser;


class DllImpExp UcBrLoopEdgeTraverser : public UcBrTraverser
{
public:
    UCRX_DECLARE_MEMBERS(UcBrLoopEdgeTraverser);
    UcBrLoopEdgeTraverser();
    UcBrLoopEdgeTraverser(const UcBrLoopEdgeTraverser& src);
    ~UcBrLoopEdgeTraverser();

    // Assignment operator
    UcBrLoopEdgeTraverser& operator =   (const UcBrLoopEdgeTraverser& src);

    // Queries & Initialisers
    UcBr::ErrorStatus   setLoopAndEdge  (UcBrEdgeLoopTraverser& edgeLoop);
    UcBr::ErrorStatus   setLoop         (UcBrFaceLoopTraverser& loop);
    UcBr::ErrorStatus   getLoop         (UcBrLoop& loop) const;
    UcBr::ErrorStatus   setEdge         (UcBrEdge& edge);
    UcBr::ErrorStatus   getEdge         (UcBrEdge& edge) const;

    // Downward links
    // Edge usage by loop (n::1)
    UcBr::ErrorStatus   getEdgeOrientToLoop(ZSoft::Boolean& orient) const;
    UcBr::ErrorStatus   getParamCurve   (UcGeCurve2d*& pcurve) const;
	UcBr::ErrorStatus	getOrientedCurve(UcGeCurve3d*& curve) const;
    UcBr::ErrorStatus   getParamCurveAsNurb(UcGeNurbCurve2d& nurb,
		                                 const double&    fitTolRequired = *(double*)NULL,
										 double&          fitTolAchieved = *(double*)NULL) const;
	UcBr::ErrorStatus	getOrientedCurveAsNurb(UcGeNurbCurve3d& nurb,
		                                 const double&    fitTolRequired = *(double*)NULL,
										 double&          fitTolAchieved = *(double*)NULL) const;

    // Queries & Initialisers
    UcBr::ErrorStatus   setLoopAndEdge  (const UcBrEdgeLoopTraverser& edgeLoop);
    UcBr::ErrorStatus   setLoop         (const UcBrFaceLoopTraverser& faceLoop);
    UcBr::ErrorStatus   setLoop         (const UcBrLoop& loop);
    UcBr::ErrorStatus   setEdge         (const UcBrEdge& edge);
};


#endif
